﻿using FirstFloor.ModernUI.Presentation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            LinkGroupCollection collection = new LinkGroupCollection();
            
            LinkGroup group = new LinkGroup { DisplayName = "المحاسبة", Icon = (StreamGeometry)FindResource("Account") };
            group.Links.Add(new Link { DisplayName = "المجموعات", Source = new Uri("/Scenarios/Group/GroupBrowserView.xaml", UriKind.Relative), Icon = (StreamGeometry)FindResource("Group") });
            group.Links.Add(new Link { DisplayName = "شجرة الحسابات", Source = new Uri("/Scenarios/Account/AccountBrowserView.xaml", UriKind.Relative), Icon = (StreamGeometry)FindResource("Group") });
            group.Links.Add(new Link { DisplayName = "اليومية", Source = new Uri("/Scenarios/Journal/JournalBrowserView.xaml", UriKind.Relative), Icon = (StreamGeometry)FindResource("Group") });
            collection.Add(group);

            group = new LinkGroup { DisplayName = "المستودعات", Icon = (StreamGeometry)FindResource("Warehouse") };
            group.Links.Add(new Link { DisplayName = "الأصول", Source = new Uri("/Scenarios/Items/AssetBrowserView.xaml", UriKind.Relative), Icon = (StreamGeometry)FindResource("Asset") });
            group.Links.Add(new Link { DisplayName = "المواد", Source = new Uri("/Scenarios/Items/ItemBrowserView.xaml", UriKind.Relative), Icon = (StreamGeometry)FindResource("Invoicing") });
            collection.Add(group);

            mm.LinkGroups = collection;
        }
    }
}
